import axios from '@/utils/axios';
import appName from "../appName";
const RobotConstants = {
	apis: {
	
		"queryPersonDetail": appName.NB + `/third/robot/queryPersonDetail?serialNumber=`,
		"queryResultDetail": appName.NB + `/third/robot/queryResultDetail?serialNumber=`,

	},
}

/* request 简单封装 */
export function call(url, param, method) {
	let option = {
		url: url,
		method: "get",
	}
	if (param) {
		option['data'] = param;
	}
	if (method) {
		option['method'] = method;
	}
	return axios(option);
}
/* 获取字符长度 */
String.prototype.getLength = function() {
	var len = 0;
	for (var i = 0; i < this.length; i++) {
		if (this.charCodeAt(i) > 127 || this.charCodeAt(i) == 94) {
			len += 2;
		} else {
			len++;
		}
	}
	return len;
}
export default RobotConstants
